package com.zixuan.sina.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class CommentVo {
    private String commentId;
    private String postId;
    private String userId;
    private String resId;
    private String resName;
    private String content;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date commentDate;
    /**
     * 上级评论id 根据它来生成评论树
     */
    private String parentId;
    private String nickName;
    private String avatar;
    private List<CommentVo> children;
}
